export default {
    props: {
        inputName: {
            default: '账号：'
        },
        inputHint: {
            default: '请输入手机号'
        },
        errorHint: {
            default: '手机号错误'
        }
    },
    data: {
        title: "",
        hintImg: "",
        isShow: false,
        isUp: false,
        isDown: false,
        lastlength: 0,
        inputValue: ""
    },
    onInit() {
        console.log("onInit")
        this.title = this.$t('strings.world');
    },
    inputChange(pv) {
        console.log("输入的值" + pv.value)
        this.inputValue = pv.value
        var value = pv.value

        if (value.length < 11) {
            this.isShow = false;
            this.isUp = false;
            this.isDown = false;
        } else if (value.length == 11) {
            this.isShow = true;
            this.hintImg = "common/images/icon_correct.png"
            this.action = "1";
            if (this.lastlength > value.length) {
                this.isUp = true
            }
            this.isDown = false;
        } else {
            this.action = "2";
            this.isShow = true;
            this.hintImg = "common/images/icon_error.png"
            this.isUp = false;
            this.isDown = true;
        }
        this.lastlength = value.length
    },
    controllHint() {
    }
}
